﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Image2ASCII
{
    class CharStyles
    {
        private const string BLACK = "@";
        private const string CHARCOAL = "#";
        private const string DARKGRAY = "8";
        private const string MEDIUMGRAY = "&";
        private const string MEDIUM = "o";
        private const string GRAY = ":";
        private const string SLATEGRAY = "*";
        private const string LIGHTGRAY = ".";
        private const string WHITE = " ";

        public static ConsoleColor GetConsoleColor(float brightness)

        public static string GetGrayShade(float brightness)
        {
            string asciival = " ";

            if (brightness >= 0.89)
            {
                asciival = WHITE;
            }
            else if (brightness >= 0.78)
            {
                asciival = LIGHTGRAY;
            }
            else if (brightness >= 0.67)
            {
                asciival = SLATEGRAY;
            }
            else if (brightness >= 0.56)
            {
                asciival = GRAY;
            }
            else if (brightness >= 0.44)
            {
                asciival = MEDIUM;
            }
            else if (brightness >= 0.33)
            {
                asciival = MEDIUMGRAY;
            }
            else if (brightness >= 0.22)
            {
                asciival = DARKGRAY;
            }
            else if (brightness >= 0.11)
            {
                asciival = CHARCOAL;
            }
            else
            {
                asciival = BLACK;
            }

            return asciival;
        }
    }
}
